home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / C64 / M-More Monthly Disks / (c)mc.d64 / gun reloadcost.c (.txt) < prev    next >
Commodore BASIC  |  2007-02-04  |  5KB  |  169 lines

  1. 100 REM ROBERT MAAS            *I LIKE *        RT 1 BOX 50            * WOMAN
  2. 110 REM SLEEPY EYE,MN          *  GUNS * ------CAN PROGRAM CARTRIDGES  *  C-64 *
  3. 120 REM
  4. 130 C1$="":C2$="[151]":C3$=""
  5. 140 TB$=""
  6. 150 DIMA$(11):DIMA(11):POKE53280,2:POKE53281,1
  7. 160 C1$="":C2$="[151]":C3$=""
  8. 170 Z$=C1$+"[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][179]"
  9. 180 N(1)=1:N(2)=20:N(3)=25:N(4)=50:N(5)=100:M(0)=100:M(1)=250:M(2)=1000:A9=2
  10. 190 DATA64,,8,255,255,255,255,255,255,3,255,255,,5,192,,3,192,,,192,,,224,,,112,,
  11. 200 DATA120,,,169,32,160,11,153,12,5,153,52,5,153,172,5,153,212,5,153,76,6,153,116
  12. 210 DATA6,153,236,6,153,20,7,153,140,7,153,180,7,136,208,223,96
  13. 220 V=53248:POKE2040,13:POKEV+21,1:POKEV+39,9:POKEV,238:POKEV+16,0
  14. 230 POKEV+21,1:POKEV+29,1
  15. 240 S$(0)="1":S$(1)="1 1/8":S$(2)="1 1/4":S$(3)="1 3/8":S$(4)="1 1/2":S(0)=40000
  16. 250 S$(5)="1 5/8":S$(6)="1 3/4":S$(7)="1 7/8":S(1)=35555:S(2)=32000:S(3)=29090
  17. 260 S(4)=26666:S(5)=24615:S(6)=22857:S(7)=21333
  18. 270 FORF=0TO31:READX:POKE832+F,X:POKE863+F,0:NEXT
  19. 280 FORF=50828TO50865:READX:POKEF,X:NEXT
  20. 290 A$(0)=" *  SHOTGUN    METALIC  *":A(0)=1
  21. 300 A$(1)=" SALES TAX             6%":A(1)=6
  22. 310 A$(2)=" 100 BULLETS       $ 8.95":A(2)=895
  23. 320 A$(3)=" 100 PRIMERS       $ 1.25":A(3)=125
  24. 330 A$(4)=" LABOR  PER    100":NN=5:A(4)=100
  25. 340 A$(5)=" COST LABOR        $ 1.00":A(5)=100
  26. 350 A$(6)=" POWDER IN GRS 20.1 ":A(6)=201
  27. 360 A$(7)=" POWDER--POUND     $ 11.11":A(7)=1111
  28. 370 A$(8)=" OZ SHOT USED  1.5":A(8)=S(A8)
  29. 380 A$(9)=" 25 LBS. SHOT      $ 12.00":A(9)=1200
  30. 390 A$(10)=" WADS IN UNIT  1000":A(10)=1000
  31. 400 A$(11)=" WAD UNIT COST     $ 16.99":A(11)=1699
  32. 410 GOSUB1590
  33. 420 PRINT"[147]"C1$;:FORF=1TO24:PRINTTAB(26)"[221]":NEXT:PRINT""
  34. 430 FORF=0TO11:PRINTC2$;A$(F):A=A+1:IFF=11THENPRINTZ$"[157][189]":GOTO460
  35. 440 IFA=2THENPRINTZ$:A=0
  36. 450 IFA=1THENPRINT
  37. 460 NEXT
  38. 470 PRINT""TAB(31)C3$"RELOADING[146][157][157][157][157][157][157][157][157][157][223] COSTS [146][169][157][157][157][157][157][157][157][157][223] PER [146][169]"
  39. 480 PRINTTAB(33)"[223]   [146][169][157][157][157][157][223] [146][169]"
  40. 490 PRINTTAB(34)" 1 [157][157][157] 20[157][157][157] 25[157][157][157] 50[157][157][157]100"
  41. 500 PRINT""Z$:PRINT""Z$
  42. 510 PRINT"[144]":GOSUB1530:GOTO570
  43. 520 QQ=Q
  44. 530 Q=PEEK(203):IFQ=64AND(QQ=5ORQQ=6)THEN1530
  45. 540 IFQ<>4ANDQ<>5ANDQ<>6ANDQ<>3THEN530
  46. 550 IFQ=5ORQ=6THENRETURN
  47. 560 GOTO1530
  48. 570 C1=11:C2=15:IFA(0)=1THENC1=15:C2=11
  49. 580 FORF=55340TO55346:POKEF,C1:POKEF+11,C2:NEXT
  50. 590 FORF=55497TO55521:POKEF,C2:POKEF+480,C1:POKEF+560,C1:POKEF+640,C1
  51. 600 POKEF+720,C1:NEXT
  52. 610 POKEV+1,60
  53. 620 GOSUB520:IFQ=3THEN680
  54. 630 IFQ=5ORQ=6THENA(0)=A(0)+1:IFA(0)>1THENA(0)=0
  55. 640 IFA(0)=0ANDQ=4THEN1460
  56. 650 IFA(0)=1ANDQ=4THEN1130
  57. 660 IFQ=5ORQ=6THEN570
  58. 670 GOTO620
  59. 680 POKEV+1,75:GOSUB520:IFQ=4THEN610
  60. 690 IFQ=6THENA(1)=A(1)-1
  61. 700 IFQ=5THENA(1)=A(1)+1
  62. 710 IFQ=3ANDA(0)=1THEN750
  63. 720 IFQ=3ANDA(0)=0THEN830
  64. 730 IFA(1)>9ORA(1)<0THENA(1)=0
  65. 740 POKE1167,A(1)+48:GOTO680
  66. 750 POKEV+1,91
  67. 760 GOSUB520:IFQ=4THEN680
  68. 770 IFQ=5THENA(2)=A(2)+1
  69. 780 IFQ=6THENA(2)=A(2)-1
  70. 790 IFQ=3THEN830
  71. 800 IFA(2)=1THENA(2)=500
  72. 810 IFA(2)>2000ORA(2)<500THENA(2)=0
  73. 820 PRINT""SPC(220)"      [157][157][157][157][157][157]"A(2)/100:GOTO760
  74. 830 POKEV+1,107
  75. 840 GOSUB520:IFQ=3THEN920
  76. 850 IFQ=4ANDA(0)=1THEN750
  77. 860 IFQ=4ANDA(0)=0THEN680
  78. 870 IFQ=5THENA(3)=A(3)+1
  79. 880 IFQ=6THENA(3)=A(3)-1
  80. 890 IFA(3)=1THENA(3)=75
  81. 900 IFA(3)>300ORA(3)<75THENA(3)=0
  82. 910 PRINT""TAB(20)"  .00[157][157][157][157][157]"A(3)/100:GOTO840
  83. 920 POKEV+1,123
  84. 930 GOSUB520:IFQ=3THEN990
  85. 940 IFQ=4THEN830
  86. 950 IFQ=5THENNN=NN+1
  87. 960 IFQ=6THENNN=NN-1
  88. 970 IFNN>5ORNN<1THENNN=1
  89. 980 A(4)=N(NN):PRINT"";TAB(14);"    [157][157][157][157]"N(NN):GOTO920
  90. 990 POKEV+1,139
  91. 1000 GOSUB520:IFQ=3THEN1060
  92. 1010 IFQ=5THENA(5)=A(5)+1
  93. 1020 IFQ=6THENA(5)=A(5)-1
  94. 1030 IFA(5)>999ORA(5)<0THENA(5)=0
  95. 1040 IFQ=4THEN920
  96. 1050 PRINT""TAB(20)"  .0 [157][157][157][157][157]"A(5)/100:GOTO1000
  97. 1060 POKEV+1,155
  98. 1070 GOSUB520:IFQ=3THEN1130
  99. 1080 IFQ=5THENA(6)=A(6)+1
  100. 1090 IFQ=6THENA(6)=A(6)-1
  101. 1100 IFA(6)>999ORA(6)<1THENA(6)=1
  102. 1110 IFQ=4THEN990
  103. 1120 PRINT""TAB(14)"     [157][157][157][157][157]"A(6)/10:GOTO1070
  104. 1130 POKEV+1,171
  105. 1140 GOSUB520:IFQ=3ANDA(0)=0THEN1220
  106. 1150 IFQ=3ANDA(0)=1THEN610
  107. 1160 IFQ=4THEN1060
  108. 1170 IFQ=5THENA(7)=A(7)+1
  109. 1180 IFQ=6THENA(7)=A(7)-1
  110. 1190 IFA(7)=1THENA(7)=600
  111. 1200 IFA(7)>2000ORA(7)<600THENA(7)=.
  112. 1210 PRINT""TAB(20)"      [157][157][157][157][157][157]"A(7)/100:GOTO1140
  113. 1220 POKEV+1,187
  114. 1230 GOSUB520:IFQ=3THEN1300
  115. 1240 IFQ=4THEN1130
  116. 1250 IFQ=5THENA8=A8+1
  117. 1260 IFQ=6THENA8=A8-1
  118. 1270 IFA8>7ORA8<0THENA8=0
  119. 1280 A(8)=S(A8)
  120. 1290 PRINT""TAB(14)"      [157][157][157][157][157][157]"S$(A8):GOTO1230
  121. 1300 POKEV+1,203
  122. 1310 GOSUB520:IFQ=3THEN1380
  123. 1320 IFQ=4THEN1220
  124. 1330 IFQ=5THENA(9)=A(9)+1
  125. 1340 IFQ=6THENA(9)=A(9)-1
  126. 1350 IFA(9)=1THENA(9)=1000
  127. 1360 IFA(9)>2000ORA(9)<1000THENA(9)=0
  128. 1370 PRINT""TAB(20)"      [157][157][157][157][157][157]"A(9)/100:GOTO1310
  129. 1380 POKEV+1,219
  130. 1390 GOSUB520:IFQ=3THEN1460
  131. 1400 IFQ=4THEN1300
  132. 1410 IFQ=5THENA9=A9+1
  133. 1420 IFQ=6THENA9=A9-1
  134. 1430 IFA9>2ORA9<0THENA9=0
  135. 1440 A(10)=M(A9)
  136. 1450 PRINT""TAB(14)"      [157][157][157][157][157][157]"A(10):GOTO1380
  137. 1460 POKEV+1,235
  138. 1470 GOSUB520:IFQ=3THEN610
  139. 1480 IFQ=4THEN1380
  140. 1490 IFQ=5THENA(11)=A(11)+1
  141. 1500 IFQ=6THENA(11)=A(11)-1
  142. 1510 IFA(11)>2500ORA(11)<0THENA(11)=0
  143. 1520 PRINT""TAB(20)"      [157][157][157][157][157][157]"A(11)/100:GOTO1470
  144. 1530 SYS50828:T=0:IFA(0)=1THENT=T+(A(2)/100):GOTO1550
  145. 1540 T=T+((A(9)/A(8))*100)+(A(11)/A(10))
  146. 1550 T=T+(A(3)/100)+((A(7)/7000*A(6))/10):T=T+(T*A(1)/100):TL=T+A(5)/A(4)
  147. 1560 PRINT"":GOSUB1570:PRINT"":T=TL:GOSUB1570:RETURN
  148. 1570 PRINTTB$""INT(T+.5)/100:PRINTTB$""INT((T*20)+.5)/100"[157]":PRINTTB$INT((T*25)+.5)/100"[157][157]"
  149. 1580 PRINTTB$INT((T*50)+.5)/100"[157][157][157]":PRINTTB$INT((T*100)+.5)/100"":RETURN
  150. 1590 ZX$="                              "
  151. 1600 PRINT"[147]"ZX$:PRINT"            RELOADING  COSTS  "
  152. 1610 PRINT"              BY  BOB MAAS    ":PRINTZX$
  153. 1620 PRINT"[154]USE THE FUNCTION KEYS TO ENTER YOUR DATA"
  154. 1630 PRINT"   [155] F2 [146][144]  TO MOVE UP A CATAGORY"
  155. 1640 PRINT"   [155] F3 [146][144]  TO RAISE VALUE OF CATAGORY"
  156. 1650 PRINT"   [155] F5 [146][144]  TO LOWER VALUE OF CATAGORY"
  157. 1660 PRINT"   [155] F7 [146][144]  TO MOVE DOWN A CATAGORY"
  158. 1670 PRINT"       TWO TOTAL COSTS ARE GIVEN"
  159. 1680 PRINT"         TOP VALUE IS YOUR COST"
  160. 1690 PRINT"         BOTTOM  INCLUDES LABOR"
  161. 1700 PRINT"           PUSH A KEY TO BEGIN  [144]"
  162. 1710 IFPEEK(197)=64THEN1710
  163. 1720 RETURN
  164. 1730 REM--------------------------------
  165. 1740 REM   ROBERT MAAS
  166. 1750 REM   RT 1 BOX 50
  167. 1760 REM   SLEEPY EYE,MN
  168. 1770 REM   56085     USA
  169.